using System;
using System.Collections.Generic;
using System.Text;
using OgilvyOne.Model;
using OgilvyOne.IDAL;
using System.Collections;

namespace OgilvyOne.BLL.SysManage
{
    public class PrivilegeKey
    {
        // Methods
        public int Delete(int iKeyID)
        {
            return OgilvyOne.DALFactory.PrivilegeKey.Create().Delete(iKeyID);
        }

        public IList getKeyInfo(int iKeyID)
        {
            return OgilvyOne.DALFactory.PrivilegeKey.Create().getKeyInfo(iKeyID);
        }

        public IList getKeyList()
        {
            return OgilvyOne.DALFactory.PrivilegeKey.Create().getKeyList();
        }

        public int Insert(PrivilegeKeyInfo keyInfo)
        {
            if (keyInfo.KeyName.Trim() == string.Empty)
            {
                return 0;
            }
            return OgilvyOne.DALFactory.PrivilegeKey.Create().Insert(keyInfo);
        }

        public int Update(PrivilegeKeyInfo keyInfo)
        {
            if (keyInfo.KeyName.Trim() == string.Empty)
            {
                return 0;
            }
            return OgilvyOne.DALFactory.PrivilegeKey.Create().Update(keyInfo);
        }

    }
}
